package com.guaoran.other.adapter;

/**
 * @author : guaoran
 * @Description : <br/>
 * @date :2018/12/20 16:33
 */
public class SayHelloWorldDemo {
    private SayWorldInterfaceImpl impl;
    public SayHelloWorldDemo(SayWorldInterfaceImpl impl) {
        this.impl = impl;
    }

    public static void main(String[] args) {
        SayWorldInterfaceImpl inter = new SayWorldInterfaceImpl();
        inter.sayHello();
        inter.sayWorld();


        SayHelloWorldDemo say = new SayHelloWorldDemo(new SayWorldInterfaceImpl());
        say.impl.sayHello();
        say.impl.sayWorld();
    }
}
